import request from '/@/utils/request'
// 查询传感器设备列表
export function listSensors(query:object) {
  return request({
    url: '/api/v1/system/sensors/list',
    method: 'get',
    params: query
  })
}
// 查询传感器设备详细
export function getSensors(id:number) {
  return request({
    url: '/api/v1/system/sensors/get',
    method: 'get',
    params: {
      id: id.toString()
    }
  })
}
// 新增传感器设备
export function addSensors(data:object) {
  return request({
    url: '/api/v1/system/sensors/add',
    method: 'post',
    data: data
  })
}
// 修改传感器设备
export function updateSensors(data:object) {
  return request({
    url: '/api/v1/system/sensors/edit',
    method: 'put',
    data: data
  })
}
// 删除传感器设备
export function delSensors(ids:number[]) {
  return request({
    url: '/api/v1/system/sensors/delete',
    method: 'delete',
    data:{
      ids:ids
    }
  })
}
//获取详细数据
export function listByCreateTime(params:any) {
  return request({
    url: '/api/v1/system/sensorDataLog/listByCreateTime',
    method: 'get',
    params
  })
}
